//将音名转换为数字
import {data} from "./music-key-value";

export function getMusicNameValue(musicName){
    switch (musicName.toLowerCase()) {
        case 'c':return 1;
        case 'd':return 2;
        case 'e':return 3;
        case 'f':return 4;
        case 'g':return 5;
        case 'a':return 6;
        case 'b':return 7;
    }
}
//把数字转换为音名
export function getMusicNameByValue(xValue){
    switch (xValue.toLowerCase()) {
        case '1':return 'c';
        case '2':return 'd';
        case '3':return 'e';
        case '4':return 'f';
        case '5':return 'g';
        case '6':return 'a';
        case '7':return 'b';
    }
}
